<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>5.2v-model</title>
</head>
<body>
    <div id="app">
        <input type="checkbox" v-model="language" value="Java">Java
        <input type="checkbox" v-model="language" value="Swift">Swift
        <input type="checkbox" v-model="language" value="Object-C">Object-C
        <h3>你选择了:{{join}}</h3>
    </div>

    <!--<script src="node_modules/vue/dist/vue.js"></script>-->
    <!-- 开发环境版本，包含了有帮助的命令行警告 -->
    <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
    <!-- 生产环境版本，优化了尺寸和速度 -->
    <!--<script src="https://cdn.jsdelivr.net/npm/vue"></script>-->
    <script type="text/javascript">
        var app = new Vue({
            el:"#app",
            data:{
                language:[]
            },
            computed:{
                join:function(){
                    return this.language.join(',');
                }
            }
        });
    </script>
</body>
</html>